package com.tf.xx.controller;

import com.tf.xx.R;
import com.tf.xx.entity.vo.CourseInfoForm;
import com.tf.xx.service.EduCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/eduservice/course")
public class EduCourseController {
    @Autowired
    private EduCourseService eduCourseService;

    @RequestMapping("/addCourseInfo")
    public String addCourseInfo(@RequestBody CourseInfoForm courseInfoForm){
        String id = eduCourseService.addCourseInfo(courseInfoForm);
        return R.ok().data("courseId", id).message("添加课程信息成功").toString();
    }
}
